export function permission(target) {
  return class extends target {
    isReadOnly() {
      const { currentMenu } = this.props.currentMenuPermission;
      return !!(currentMenu && currentMenu.operationType !== 'RW');
    };

    isAuthPolicyAll() {
      const { currentMenuPermission } = this.props.currentMenuPermission;
      return !!(currentMenuPermission && currentMenuPermission.authPolicyAll);
    }
  };
}
